All Questions
5 questions
1vote
2answers
3kviews
"No X11 DISPLAY variable was set [...]" when using java.swing
When I'm trying to run a Java GUI application from the command line, I get: Exception in thread "main" java.awt.HeadlessException: "No X11 DISPLAY variable was set, or no headful ...
0votes
0answers
1kviews
How to set Java version to all users
I set the JAVA_HOME parameters in the etc/environment/ and when I do echo $JAVA_HOME, I can see the latest version which I have set. But when I do java -version it shows a different version, which is ...
3votes
1answer
22kviews
Why do I see "Unable to locate tools.jar. Expected to find it in ...." when I run ant (on RHEL 6.6) even though the path is set [closed]
I created a script in /etc/profile.d and named it jdk_home.sh. The contents of jdk_home.sh are as follows : #!/bin/sh export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") export ...
1vote
1answer
5kviews
How to set a path variable without root acess? [duplicate]
My college currently uses a very old (like 3 years old) openJDK 1.7 distribution. And being a student, obviously I don't have root privileges. I wanted to use a much later version downloaded a much ...
0votes
1answer
596views
How to change JAVA_HOME temprorary with env command
I use openjdk for my work, but sometimes I need oracle's JRE. I thought that I could use 'env' command for this, but can't figure out why it's not working. I have openjdk in /usr/lib/jvm/java-1.8.0-...